<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.util.Locale"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<base href="<%=basePath%>"/>
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<jsp:include page="../../inc.jsp"></jsp:include>
<title>treelistdemo</title>
     <link href="platform/skins/skin01/css/commonbg.css" rel="stylesheet" />
    <link href="platform/skins/skin01/css/treeView.css" rel="stylesheet" />   
    <link href="platform/skins/skin01/css/zyicons.css" rel="stylesheet" />
     
  
	
	
	
    
<script language="JavaScript"> 
    var $dg;
	var $grid;
	var $dg1;
	var $grid1;
	$(function() {
		 $dg = $("#dg");
		 $grid=$dg.datagrid({
			url : "budgetInitEditAction!find.action",
			//c_id":"FQ104903","c_organize":"14020216","c_status":"已审核","c_year":"2014","page":0,"rows":0},{"c_cashier_status":"未确认","c_flow_tag":"未签
			width : 'auto',
			height : $(this).height()/2,
			
			rownumbers:true,
			border:true,
			striped:true,
			singleSelect:true,
			columns : [ [ {field : 'c_id',title : '单据编号',width : parseInt($(this).width()*0.1)},
			              {field : 'c_organize',title : '机构代码',width : parseInt($(this).width()*0.1)},
			              {field : 'c_status',title : '状态',width : parseInt($(this).width()*0.1)},
			              {field : 'c_year',title : '预算年份',width : parseInt($(this).width()*0.1)},
			              {field : 'c_cashier_status',title : '状态',width :parseInt($(this).width()*0.1),align : 'left'},
			              {field : 'c_flow_tag',title : '审核标志',width :parseInt($(this).width()*0.1),align : 'left'}
			              
			              ] ],toolbar:'#tb'
		});			 
		 
		//搜索框
			$("#searchbox").searchbox({ 
				 menu:"#mm", 
				 prompt :'模糊查询',
			    searcher:function(value,name){   
			    	var str="{\"searchName\":\""+name+"\",\"searchValue\":\""+value+"\"}";
		            var obj = eval('('+str+')');
		            $dg.datagrid('reload',obj); 
			    }
			   
			}); 
			 $dg1 = $("#dg1");
			 $grid1=$dg1.datagrid({
				url : "budgetInitEditAction!find.action",
				width : 'auto',
				height : $(this).height()/2,
				pagination:true,
				rownumbers:true,
				border:true,
				striped:true,
				singleSelect:true,
				columns : [ [ {field : 'c_id',title : '单据',width : parseInt($(this).width()*0.1)},
			              {field : 'c_organize',title : '组织',width : parseInt($(this).width()*0.1)},
			              {field : 'c_status',title : '状态',width : parseInt($(this).width()*0.1)},
			              {field : 'c_year',title : '年份',width : parseInt($(this).width()*0.1)},
			              {field : 'c_cashier_status',title : '现金状态',width :parseInt($(this).width()*0.1),align : 'left'},
			              {field : 'c_flow_tag',title : '审核',width :parseInt($(this).width()*0.1),align : 'left'}
			              ] ],toolbar:'#tb'
			});
		
	});
	//弹窗增加
			function addRowsOpenDlg() {
				parent.$.modalDialog({
					title : "添加",
					width : 600,
					height : 400,
					href : "platform/supreport/userEditDlg.jsp",
					buttons : [ {
						text : '保存',
						iconCls : 'icon-ok',
						handler : function() {
							parent.$.modalDialog.openner= $grid;
							var f = parent.$.modalDialog.handler.find("#form");
							f.submit();
						}
					}, {
						text : '取消',
						iconCls : 'icon-cancel',
						handler : function() {
							parent.$.modalDialog.handler.dialog('destroy');
							parent.$.modalDialog.handler = undefined;
						}
					}
					]
				});
			}
	function doAdd()       
	{
		alert("Add");
		document.getElementById('btnEdit').disabled = 'disabled'; 
		//$("#btnEdit").linkbutton("disable");
	}
	function doSave()       
	{
	}
	//查询
	function  doSearch() {
	    //alert("Search");
		jqueryUtil.gradeSearch($dg,"#userSearchFm","platform/supreport/userSearchDlg.jsp");
		//alert("Search1");
	}
</script>
</head>
<body style="margin:2">

      
       
           <div class="panelHeader">
               <a href="javascript:doNewRow()" class="btnicon" onclick="addRowsOpenDlg()" id="btnAdd" >
	            <span class="btnicon-left">
	            <span class="zyicons add"></span>
	            <span class="btntxt">新增</span>
	           </span>
		       </a>
		       <a href="javascript:doSave()" class="btnicon" id="btnEdit">
		            <span class="btnicon-left">
		                <span class="zyicons pencil"></span>
		                <span class="btntxt">编辑</span>
		            </span>
		       </a>		       
		       <a href="javascript:doNewRow()" class="btnicon">
	            <span class="btnicon-left">
	                <span class="zyicons edit"></span>
	                <span class="btntxt">编辑2</span>
	            </span>
		       </a>		       
		       <a href="javascript:doSave()" class="btnicon">
		            <span class="btnicon-left">
		                <span class="zyicons remove"></span>
		                <span class="btntxt">删除</span>
		            </span>
		       </a>
		       <a href="javascript:doSave()" class="btnicon">
		            <span class="btnicon-left">
		                <span class="zyicons del"></span>
		                <span class="btntxt">删除2</span>
		            </span>
		       </a>		      
		       <a href="javascript:doSave()" class="btnicon" onclick="doSearch()">
		            <span class="btnicon-left">
		                <span class="zyicons search"></span>
		                <span class="btntxt">查询</span>
		            </span>
		       </a>
		       <a href="javascript:doSave()" class="btnicon">
		            <span class="btnicon-left">
		                <span class="zyicons download"></span>
		                <span class="btntxt">导出</span>
		            </span>
		       </a>
		       <a href="javascript:doSave()" class="btnicon">
		            <span class="btnicon-left">
		                <span class="zyicons download"></span>
		                <span class="btntxt">导入</span>
		            </span>
		       </a>
		       <a href="javascript:doSave()" class="btnicon">
		            <span class="btnicon-left">
		                <span class="zyicons col"></span>
		                <span class="btntxt">设置</span>
		            </span>
		       </a>		       
		       <a href="javascript:doSave()" class="btnicon">
		            <span class="btnicon-left">
		                <span class="zyicons no"></span>
		                <span class="btntxt">取消</span>
		            </span>
		       </a>
		        <a href="javascript:doSave()" class="btnicon">
		            <span class="btnicon-left">
		                <span class="zyicons ok"></span>
		                <span class="btntxt">确认</span>
		            </span>
		       </a>		      
		       <a href="javascript:doSave()" class="btnicon" >
		            <span class="btnicon-left">
		                <span class="zyicons print"></span>
		                <span class="btntxt">打印</span>
		            </span>
		       </a>	       
		       <a href="javascript:doSave()" class="btnicon">
		            <span class="btnicon-left">
		                <span class="zyicons save"></span>
		                <span class="btntxt">保存</span>
		            </span>
		       </a>		      		       
            </div>
     <!--        
     <div id="treeViewdiv" style="margin:4px 1px">
    </div>   
     --> 
    <div id="dg1">  
	</div>  
	<!-- title="日志" -->
    <div id="new">
	    <table id="dg" ></table>
	</div>         
<div id="datatabdiv" > 
搜索               
</div>



<!-- 
<div style="border:dotted 2px black; background-color:Yellow; width:100px;height:100px;">
              
</div>
 -->
</body>

</html>
